if [ -z "${JVM_MINIMUM_MEMORY}" ]; then
    JVM_MINIMUM_MEMORY="1024m"
fi

if [ -z "${JVM_MAXIMUM_MEMORY}" ]; then
    JVM_MAXIMUM_MEMORY="2048m"
fi

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} -Dfile.encoding=UTF-8 $JAVA_OPTS"

export JAVA_OPTS

# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
    if [ -n "$CATALINA_BASE" ] ; then
        CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
    elif [ -n "$CATALINA_HOME" ] ; then
        CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
    fi
fi
export CATALINA_PID
